<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .demo{
            display: flex;
        }
        .flex{
            flex: 1;
            /* width: 50%; */
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="demo">
        <div class="flex" style="background-color: blue;"></div>
        <div class="flex" style="background-color: pink;"></div>
        <div class="flex" style="background-color: blue;"></div>
        <div class="flex" style="background-color: pink;"></div>
    </div>
</body>
</html>